﻿using System.ComponentModel;
using System.Windows.Forms;
using WeForms.Design;

namespace WeForms
{
    [Designer(typeof(WeTabSideBarControlDesigner))]
    public abstract class WeTabSideBarControl : Control
    {

        public WeTabSideBarControl()
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.FixedWidth, true);
            SetStyle(ControlStyles.FixedHeight, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            base.DoubleBuffered = true;

            Margin = new Padding(4);
            Padding = new Padding(5, 4, 5, 4);
            base.AutoSize = true;
        }

        public override string Text
        {
            get
            {
                return base.Text;
            }
            set
            {
                base.Text = value;
                Invalidate();
            }
        }
        public abstract override System.Drawing.Size GetPreferredSize(System.Drawing.Size proposedSize);
    }
}
